package com.share.model;

import java.sql.Blob;
import java.util.List;

public class ShareService {

	private ShareDAO_interface dao;

	public ShareService() {
		dao = new ShareDAO();
	}

	public List<ShareVO> getAll() {
		return dao.getAll();
	}

	public void deleteShare(Integer ord_no) {
		dao.delete(ord_no);
		
	}

	public ShareVO addShare(Number mem_no, Number pro_no, String pro_name,
			String exp_content, byte[] upd_picture) {

		ShareVO shareVO = new ShareVO();

		shareVO.setMem_no(mem_no);
		shareVO.setPro_no(pro_no);
		shareVO.setPro_name(pro_name);
		shareVO.setExp_content(exp_content);
		shareVO.setUpd_picture(upd_picture);
		dao.insert(shareVO);

		return shareVO;
	}

}
